package store.lunangangster.bpmn.converter;

import javax.xml.stream.XMLStreamReader;
import store.lunangangster.bpmn.model.Gateway;

/**
 * 解析Gateway的{@link Gateway#getDefaultSequenceFlow()}属性并封装
 *
 * @author cwk
 * @version 1.0
 */
public abstract class GatewayConverter extends FlowNodeConverter {

  protected void parseGatewayAttribute(XMLStreamReader xsr, Gateway gateway) {
    String defaultSequenceFlow = xsr.getAttributeValue(null, ATTRIBUTE_GATEWAY_DEFAULT);
    gateway.setDefaultSequenceFlow(defaultSequenceFlow);
  }
}
